<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.js"></script>
    <script src="/js/layui-v2.4.3/layui/layui.js"></script>
    <script type="text/javascript" src="../js/jQuery/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../js/jQuery/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="../js/check.js"></script>
    <link rel="stylesheet" type="text/css" href="../js/jQuery/themes/default/easyui.css"/>
    <link rel="stylesheet" type="text/css" href="../js/jQuery/themes/icon.css"/>
    <link rel="stylesheet" href="/js/layui-v2.4.3/layui/css/layui.css" media="all"/>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">智能停车场管理系统</div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item"><a href="#" onclick="logout()">退出</a></li>
        </ul>
    </div>
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item"><a href="#" onclick="openTabs(this)">费用管理</a></li>
                <li class="layui-nav-item"><a href="#" onclick="openTabs(this)">车辆进出场</a></li>
                <li class="layui-nav-item"><a href="#" onclick="openTabs(this)">车位管理</a></li>
            </ul>
        </div>
    </div>
    <div class="layui-body" style="height: 100%">
        <div id="tt" class="easyui-tabs" style="width: 100%;height: 100%; ">


        </div>

    </div>

</div>
<script>
    $(document).ready(function () {

        var content1 = '<iframe scrolling="no" frameborder="0" src="/views/welcome.html" style="width:100%;height:100%;"></iframe>'
        $('#tt').tabs('add', {
            title: '首页',
            content: content1,
            closable: false

        });
    });

    function openTabs(param) {
        var value = param.innerHTML;
        if (value == "费用管理") {
            var content = '<iframe scrolling="no" frameborder="0" src="/views/fee.html" style="width:100%;height:100%;"></iframe>';
            if ($('#tt').tabs('exists', '费用管理')) {

                $('#tt').tabs('select', '费用管理');
            } else {
                $('#tt').tabs('add', {
                    title: '费用管理',
                    content: content,
                    closable: true

                });
            }

        }

        else if (value == "车辆进出场") {
            var content = '<iframe scrolling="no" frameborder="0" src="/views/record.html" style="width:100%;height:100%;"></iframe>';
            if ($('#tt').tabs('exists', '车辆进出场')) {

                $('#tt').tabs('select', '车辆进出场');
            } else {
                $('#tt').tabs('add', {
                    title: '车辆进出场',
                    content: content,
                    closable: true

                });
            }

        }

        else if (value == "车位管理") {
            var content = '<iframe scrolling="no" frameborder="0" src="/views/park.html" style="width:100%;height:100%;"></iframe>';
            if ($('#tt').tabs('exists', '车位管理')) {

                $('#tt').tabs('select', '车位管理');
            } else {
                $('#tt').tabs('add', {
                    title: '车位管理',
                    content: content,
                    closable: true

                });
            }

        }
    }

    function logout() {
        window.localStorage.clear();
        window.location.href = "/login_view.html";
    }
</script>


</body>
</html>